﻿using Bricks.Component.Utils;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace Bricks.Business.Models.ScheduleManagement
{
    /// <summary>
    /// 隧道统计
    /// </summary>
    public class TunnelStatistics : EntityBase<Guid>
    {
        public TunnelStatistics()
        {
            ID = GuidHelper.NewGuid();
        }

        #region 流程固定字段（From Chufl）
        [Required]
        [StringLength(255)]
        [Description("流程编码")]
        public string FlowCode { get; set; }
        public DateTime RequestDate { get; set; }

        /// <summary>
        /// 申请人
        /// </summary>
        public string RequestPerson { get; set; }

        /// <summary>
        /// 流转状态（0：申请；1：流转；2：结束；3：终止；4：回退）
        /// </summary>
        [Required]
        [StringLength(1)]
        public string HandleState { get; set; }

        /// <summary>
        /// 关联节点Code
        /// </summary>
        public string AssociatedNodeCode { get; set; }

        /// <summary>
        /// 最后更新的用户部门
        /// </summary>
        public string LastUpdateUserDepartment { get; set; }

        /// <summary>
        /// 最后更新的用户
        /// </summary>
        public string LastUpdateUser { get; set; }

        /// <summary>
        /// 最后更新时间
        /// </summary>
        public DateTime? LastUpdateTime { get; set; }

        /// <summary>
        /// 保存状态，为了判断是否能回退，只要点了保存按钮就更新这个字段为“1”
        /// </summary>
        public string SaveState { get; set; }
        #endregion

        #region 表单字段
        /// <summary>
        /// 所属项目ID
        /// </summary>
        public Guid ProjectID { get; set; }

        /// <summary>
        /// 所属标段ID
        /// </summary>
        public Guid ContractID { get; set; }

        /// <summary>
        /// 统计周期（yyyy年MM月）
        /// </summary>
        public string StatisticalCycle { get; set; }
        #endregion
    }
}
